<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>3-正则断言</title>
</head>
<body>
    <script>
        // 声明字符串
        let str = `JS5211314你知道么555啦啦啦`;

        // 正向断言
        // const reg = /\d+(?=啦)/;
        // const result = reg.exec(str);

        // 反向断言
        const reg = /(?<=么)\d+/;
        const result = reg.exec(str);
        console.log(result);
    </script>
</body>
</html>